package com.springboot_blog.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

/**
 * 用户登录 DTO
 */
@Data
@Schema(description = "用户登录请求")
public class LoginDTO {

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 50, message = "用户名长度必须在3-50个字符之间")
    @Schema(description = "用户名", example = "admin")
    private String username;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度必须在6-20个字符之间")
    @Schema(description = "密码", example = "password123")
    private String password;

    /**
     * 记住我
     */
    @Schema(description = "是否记住登录状态", example = "false")
    private Boolean rememberMe = false;

    /**
     * 请求来源
     */
    @Schema(description = "请求URL的来源",example = "admin")
    private String Source;
}
